package com.gonsin.gmessage.logic.utils;

import org.apache.commons.beanutils.Converter;

public class MyDoubleConverter implements Converter {

    @Override
    public <T> T convert(Class<T> type, Object value) {
        if(value == null){
            return null;
        }
        if(Double.class == value.getClass()){
            return (T) value;
        }
        return (T) Double.valueOf(value.toString());
    }
}
